package model;

public class TakeableItem extends Item{
	protected Entity carriedBy;
	
	public boolean touch(Entity e)
	{
		if(e.getInventory().addItem(this))
		{
			carriedBy = e;
			return(true);
		}
		else
		{
			return(false);
		}
	}
	public Tile getLocation()
	{
		if(carriedBy != null)
		{
			return(carriedBy.getLocation());
		}
		else
		{
			return(location);
		}
	}
}
